<template>
	<view class="">
		<view>
			<view class="item" v-for="(value,index) in iconType.slice(0,1)" :key="index">
			    <icon :type="value" size="80"/>
			    <text class="end_text">购买成功</text>
				<text>本产品于<text class="blue_text">{{nowTime}}</text>开始计算收益</text>
			</view>
		</view>
		<view class="btn_box">
			
				<view class="all_btn btn_L" @tap="go">
					再去逛逛
				</view>

			<navigator url="/pages/MyAssets/MyAssets">
				<view class="all_btn btn_R">
					查看我的资产
				</view>
			</navigator>
			
		</view>
	</view>
</template>

<script>
	import getDateTime from '../../common/getdataTime.js';
	export default {
		data() {
			return {
				iconType: ['success'],
				nowTime: '',
			}
		},
			onLoad() {
		        // #ifdef APP-PLUS|| MP-WEIXIN
		        this.iconType = ['success', 'success_no_circle', 'info', 'warn', 'waiting', 'cancel', 'download', 'search','clear']
		        // #endif
		        // #ifdef MP-ALIPAY
		        this.iconType = ['info', 'warn', 'waiting', 'cancel', 'download', 'search', 'clear', 'success', 'success_no_circle', 'loading']
		        // #endif
		        // #ifdef MP-BAIDU
		        this.iconType = ['success', 'info', 'warn', 'waiting', 'success_no_circle', 'clear', 'search', 'personal', 'setting', 'top', 'close', 'cancel', 'download', 'checkboxSelected', 'radioSelected', 'radioUnselect']
		        // #endif
		    },
			onLoad(option) {
						var timeStr = getDateTime.dateTimeStr('y-m-d h:i:s'); // y:年 m:月 d:日 h:时 i:分 s:秒 中间的分割符号可更改
						this.nowTime = timeStr
					},
		methods: {
			go(){
				uni.switchTab({
					url:'/pages/wealth/wealth'
				})
			}
		}
	}
</script>

<style lang="scss">
.item{
	display: flex;
	flex-direction: column;
	align-items: center;
	margin-top: 300rpx;
	font-size: 24rpx;
	.end_text{
		margin-top: 30rpx;
		color: #999999;
		margin-bottom: 30rpx;
		font-size: 36rpx;
	}
	.blue_text{
		color: #3476F1;
	}
}
.btn_box{
	display: flex;
	justify-content: space-around;
	margin-top: 200rpx;
	.all_btn{
		width: 260rpx;
		height: 88rpx;
		border-radius: 10rpx;
		font-size: 32rpx;
		line-height: 88rpx;
		text-align: center;
	}
	.btn_L{
		border: 1px solid #888888;
		color: #888888;
	}
	.btn_R{
		border: 1px solid #3476F1;
		color: #3476F1;
	}
}
</style>
